home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 17
/
AMIGAplus Sonderheft 17 (1999)(ICP)(DE)[!].iso
/
Tools
/
Heddley
/
Archive
/
savenode.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1994-08-29
|
2KB
|
39 lines
/* savenode.rexx */
/* by Edd Dumbill */
/* 2 July 1994 */
/* returns a document from GoldED to Heddley */
/* use this macro as a basis for interfacing with other aynschronous */
/* text editors. */
OPTIONS RESULTS /* enable return codes */
if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
address 'GOLDED.1'
'LOCK CURRENT' /* lock GUI, gain access */
OPTIONS FAILAT 6 /* ignore warnings */
SIGNAL ON SYNTAX /* ensure clean exit */
SIGNAL ON FAILURE /* trap Heddley errors */
SAVE NAME 'T:temp_node' /* save document text back */
address 'HEDDLEY.1' /* talk to Heddley */
EDIT LOADTEXT 'T:temp_node' /* reload document text */
LOCK UNLOCK /* unlock front panel */
address 'GOLDED.1' /* talk to GoldED */
'UNLOCK' /* VERY important: unlock GUI */
EXIT /* quit this macro */
SYNTAX: /* ARexx error... */
SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) /* report it... */
UNLOCK /* unlock GUI */
EXIT /* exit */
FAILURE: /* Heddley error... */
ERRV=address().LASTERROR /* get name of error var. */
SAY "Error:" VALUE(ERRV) /* report the error */
ADDRESS GOLDED.1 /* talk to GoldED */
UNLOCK /* unlock GUI */
EXIT /* exit */